package com.ald.crossex.system;


import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by lishijiong on 15/2/11.
 */
public class SystemCache {


    private static Logger logger = Logger.getLogger(SystemCache.class);
    private static final Map<String, SystemCacheItem> cache = new HashMap<String, SystemCacheItem>();

    public static SystemCacheItem get(String key) {
        return cache.get(key);
    }

    public static void put(String key, SystemCacheItem item) {

        cache.put(key,item);

    }

    public static void put(String key, Object obj){
        SystemCacheItem item = new SystemCacheItem();
        item.setObject(obj);
        item.setLastTime(System.currentTimeMillis());
        cache.put(key,item);
    }
}
